package br.mikhas.container.factory;

/**
 * Default container exception
 * 
 * @author Mikhail Domanoski
 * 
 */
public class IOCContainerException extends RuntimeException {

	private static final long serialVersionUID = 7014336585062106494L;

	public IOCContainerException() {
		super();
	}

	public IOCContainerException(String message) {
		super(message);
	}

	public IOCContainerException(Throwable cause) {
		super(cause);
	}

	public IOCContainerException(String message, Throwable cause) {
		super(message, cause);
	}

	@Override
	public String toString() {
		String string = super.toString();
		Throwable cause = this.getCause();

		if (cause != null) {
			string += ", caused by: " + cause.toString();
		}
		return string;
	}
}
